package com.thoughtworks.commonlibrary.compat.rxjava;


import io.reactivex.ObservableTransformer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

/**
 * desc   : 线程调度管理
 * author : guowenlong
 * Email  : guowenlong20000@gmail.com
 */
public class RxSchedulers {

    public static <T> ObservableTransformer<T, T> ioToMain() {
        return upstream -> upstream.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());
    }
}